Integrand size = 30, antiderivative size = 132 \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=-\frac {3 a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}+\frac {4 a^3 \operatorname {Hypergeometric2F1}(1,1+n p,2+n p,i \tan (e+f x)) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}-\frac {i a^3 \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (2+n p)} \]
[Out]
Time = 0.38 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1600, 1970, 90, 66, 45} \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\frac {4 a^3 \tan (e+f x) \operatorname {Hypergeometric2F1}(1,n p+1,n p+2,i \tan (e+f x)) \left (c (d \tan (e+f x))^p\right )^n}{f (n p+1)}-\frac {i a^3 \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (n p+2)}-\frac {3 a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (n p+1)} \]
[In]
[Out]
Rule 45
Rule 66
Rule 90
Rule 1600
Rule 1970
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (c (d x)^p\right )^n (a+i a x)^3}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\left (c (d x)^p\right )^n (a+i a x)^2}{\frac {1}{a}-\frac {i x}{a}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\left (\tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {x^{n p} (a+i a x)^2}{\frac {1}{a}-\frac {i x}{a}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\left (\tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \left (-2 a^3 x^{n p}+\frac {4 a^2 x^{n p}}{\frac {1}{a}-\frac {i x}{a}}-a^2 x^{n p} (a+i a x)\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {2 a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}-\frac {\left (a^2 \tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int x^{n p} (a+i a x) \, dx,x,\tan (e+f x)\right )}{f}+\frac {\left (4 a^2 \tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {x^{n p}}{\frac {1}{a}-\frac {i x}{a}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {2 a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}+\frac {4 a^3 \operatorname {Hypergeometric2F1}(1,1+n p,2+n p,i \tan (e+f x)) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}-\frac {\left (a^2 \tan ^{-n p}(e+f x) \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \left (a x^{n p}+i a x^{1+n p}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {3 a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}+\frac {4 a^3 \operatorname {Hypergeometric2F1}(1,1+n p,2+n p,i \tan (e+f x)) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (1+n p)}-\frac {i a^3 \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{f (2+n p)} \\ \end{align*}
Time = 0.89 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.70 \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\frac {a^3 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (-3 (2+n p)+4 (2+n p) \operatorname {Hypergeometric2F1}(1,1+n p,2+n p,i \tan (e+f x))-i (1+n p) \tan (e+f x))}{f (1+n p) (2+n p)} \]
[In]
[Out]
\[\int \left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n} \left (a +i a \tan \left (f x +e \right )\right )^{3}d x\]
[In]
[Out]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
[In]
[Out]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=- i a^{3} \left (\int i \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n}\, dx + \int \left (- 3 \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \tan {\left (e + f x \right )}\right )\, dx + \int \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \tan ^{3}{\left (e + f x \right )}\, dx + \int \left (- 3 i \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \tan ^{2}{\left (e + f x \right )}\right )\, dx\right ) \]
[In]
[Out]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
[In]
[Out]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+i a \tan (e+f x))^3 \, dx=\int {\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3 \,d x \]
[In]
[Out]